package com.yn.bsc.service.impl;

import com.yn.bsc.dao.SiteStationsMapper;
import com.yn.bsc.model.SiteStations;
import com.yn.bsc.service.SiteStationsService;
import com.yn.bsc.core.AbstractService;
import com.yn.bsc.vo.SiteStationsVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


/**
 * Created by ZuoLG on 2017/09/20.
 */
@Service
@Transactional
public class SiteStationsServiceImpl extends AbstractService<SiteStations> implements SiteStationsService {
    @Resource
    private SiteStationsMapper siteStationsMapper;

    @Override
    public List<SiteStations> findAll(){
        return siteStationsMapper.selectAllWithArea();
    }

    @Override
    public List<SiteStationsVo> findAllGroupByCity(int type) {
        return siteStationsMapper.findAllGroupByCity(type);
    }

    @Override
    public List<SiteStationsVo> findSiteByScoreGroupByCity(int type,String start,String end) {
        double score = 70;
        return siteStationsMapper.findSiteByScoreGroupByCity(score,type,start,end);
    }
}
